import 'package:flutter/material.dart';
import '../../../utils/util.dart';
import 'index.dart';
import 'widgets/widgets.dart';

class AnalysisPage extends StatelessWidget {
  AnalysisPage({Key? key}) : super(key: key);
  final controller = Get.put(AnalysisController());
  final state = Get.find<AnalysisController>().state;
  // 主视图
  Widget _buildView() {
    return const HelloWidget();
    return ListView.builder(
      itemBuilder: (ctx, idx) {
        var md = state.list[idx];
        return AnalysisTouchCell(md: md);
      },
      itemCount: state.list.length,
    );
  }

  @override
  Widget build(BuildContext context) {
    return GetBuilder<AnalysisController>(
      builder: (_) {
        return Scaffold(
          appBar: AppBar(
            title: Text(
              '分析',
              style: TextStyle(
                color: Colors.white,
                fontSize: 17.sp,
              ),
            ),
          ),
          body: SafeArea(
            child: _buildView(),
          ),
        );
      },
    );
  }
}
